home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
enigma
/
earcd
/
utility
/
utilrexx
/
wac104.lha
/
WAC.Doc
< prev
next >
Wrap
Text File
|
1996-11-01
|
9KB
|
211 lines
WAC
---
Version 1.04 - November 1996
Copyright © Michael Tanzer 1993, 1996
+---------------------------------------------------------------------------+
| N O T I C E |
| |
| Freely distributable. Not to be used for commercial purposes without |
| written consent from the author. Not to be distributed without this |
| notice and accompanying components intact. |
| |
| This product is distributed on an 'as-is' basis, with no warranty of any |
| kind, either express or implied. No responsibility whatsoever is assumed |
| by the author for the use of this product, nor for any results of its |
| use. No claim whatsoever is made as to this product's accuracy, useful- |
| ness, completeness, nor suitability to any purpose. |
| |
| Components include the following files: |
| WAC |
| WAC.info |
| WAC.Doc (this document) |
| WAC.Doc.info |
| |
+---------------------------------------------------------------------------+
What's WAC?
-----------
WAC ('What?! Another Calendar?!') is a calendar utility written in Rexx.
Why WAC?
--------
WAC is a calendar. It's not a clock. It's not a diary. Just a calendar.
It has virtually no CPU overheads while it is active because the only time
it does anything is when you change the month or year being displayed.
WAC can display a single month or (if your screen is large enough) an entire
year. The mode (month or year) and window positions can be saved so that
the windows will appear wherever you want them when you run WAC.
WAC runs asynchronously, so you can run it without tying up a shell.
Best of all, WAC is written in Rexx, so if you want to add or change a
feature, you can do it easily. And it's free.
What you need in order to use WAC:
----------------------------------
You must have the following libraries in your LIBS: directory:
rexxsyslib.library (version 36.17 or later)
rexxsupport.library (version 34.9 or later)
rexxarplib.library (version 3.0 or later)
arp.library (version 39.1 or later)
screenshare.library (version 1.46 or later - required only for WB1.3)
The RX and WaitForPort commands should be contained in a directory that is
in your default path. In WB2+ they are in the Rexxc directory.
How to implement WAC:
---------------------
Copy WAC to your REXX: directory. If you are running WB2 or later, make
sure the 'script' flag is set.
If you want to start WAC with an icon, copy WAC.info to the drawer of your
choice.
If you use a large font for screen text, you may find that the window title
overlays part of the window contents. In this case, try adding 1 or 2 to
the value of the 'blanks' variable at the beginning of the program.
How to use WAC:
---------------
To run WAC from the Workbench, double-click the WAC icon.
To run WAC from a WB2+ shell, enter:
WAC
From a WB1.3 shell, enter:
RX WAC
The WAC window will appear, showing the calendar for the current month with
the current date highlighted. You can decrement or increment the month
and year by selecting the gadgets on either side of the appropriate string
gadget. Note that incrementing the month from December to January will
cause the year to be incremented; decrementing the month from January to
December will cause the year to be decremented.
You can choose the month by selecting the month string gadget, pressing
right-Amiga-x to clear it, and typing the number, name or abbreviation of
the name of the desired month and pressing the enter key. Abbreviations
are tested beginning with January, so:
j --> January
ju --> June
a --> April
au --> August
s --> September
10 --> October
and so on. Similarly, you can choose the year by selecting the year string
gadget and entering a new year. Note that the earliest year that can be
specified is 1900; the latest year is 2099. Specification of invalid months
or years is ignored.
You can select 'Reset' from the menu to return to the current date. Click
on the close gadget or select 'Quit' from the menu to terminate WAC.
If you want to display the entire year, select 'Mode/Year' from the menu.
Note that the window for this mode is 568 pixels wide and 346 pixels high,
so don't try to use it unless your screen is large enough. (If it isn't,
WAC should safely terminate - but I'm not making any promises!) Since WB2+
allows you to define a logical screen larger than the physical screen, you
should have plenty of scope to create a screen large enough to contain this
window. Using an interlaced screen will also provide the required space.
The default positions for the WAC windows are in the upper left hand corner
of the screen, but you can change this by dragging the windows to the your
preferred locations (position one window, change modes, then position the
other window), selecting the mode to be used at startup, and selecting
'Save prefs' from the menu. The mode and screen positions will be stored
in a configuration file ('S:WAC.config').
When WAC is started, it will terminate any already-active WAC display.
WAC can be used to determine the date that is a number of days, weeks,
months or years from another date. The 'current' date can be changed by
entering the day after the month in the month string. If you clear this
string (e.g. via ctrl-x) you can enter a number preceded by a '+' or a '-'
and followed by 'days', 'weeks', 'months', or 'years'. For example, to
determine the date which is 26 weeks after 3 April 1995, change the
year to 1995, clear the month and enter 'apr 3', then clear the month
again and enter '+26 weeks'. 'Days' is the default if no other period is
specified, and any period can be abbreviated.
Version log:
------------
1.00 Jan 1992 Original release.
1.01 Feb 1992 Provided year mode;
Allowed mode and window locations to be set and saved;
Permitted specification of month by number;
Improved icon.
1.02 Apr 1993 Enabled relative date changes.
1.03 May 1996 Enabled specification of date in month string;
Provided offset for large screen text font.
1.04 Nov 1996 Fixed minor bug.
Other things you might like to know about WAC:
----------------------------------------------
WAC is coded in such a way that you should find it quite easy to make
adjustments to it. For example, if you prefer the weeks to begin on Sunday
rather than Monday, you need only to change the variable 'heading' from
'Mo Tu We Th Fr Sa Su' to 'Su Mo Tu We Th Fr Sa' and change the line
'return days//7' (which appears after the 'getday:' label near the end of
the program) to 'return (days+1)//7'.
Before you make any complicated changes, comment out the paragraph at the
top of the program having the comment 'Run WAC asynchronously' so that you
can insert trace commands, etc. as required, then invoke the test version
from a shell. It may also be advisable to comment out the 'signal on halt'
and 'trace b' lines that appear at the top of the main control loop.
The WAC notify port can be addressed by other Rexx programs, so it is
possible to manipulate the WAC display from another process. The following
commands are available:
Command Action
------- ------
QUIT Terminates the WAC display
CLOSEWINDOW Terminates the WAC display
RESET Changes to the current date (current day is highlighted)
MLESS Decrements the month
MSTRG month Changes to the specified month (e.g. MSTRG JUL or MSTRG 7)
MMORE Increments the month
YLESS Decrements the year
YSTRG year Changes to the specified year (e.g. YSTRG 2001)
YMORE Increments the year
MMODE Changes to month mode
YMODE Changes to year mode
SPREF Stores mode and window positions in config file
The name of the WAC notify port is 'WAC', so by coding:
address wac 'reset'
you can have your Rexx program reset the WAC display to the current date.
You are free use WAC for as long as you like and to modify it in any way
that suits your needs, but please do not distribute a modified version. I
do not ask for any remuneration, but if you would like to send me anything
I would be delighted to receive it (but please, no more Porsches). I will
make a sincere effort to answer any questions you may have about WAC. My
address is:
Michael Tanzer
P.O. Box 289
Carlton North VIC 3054
Australia
Telephone: +61 3 9387 6589
Facsimile: +61 3 9388 1863